@layout("../layout/base.html",{title:"支付宝-APP支付"},"__CONTENT__"){
<form class="form-horizontal" method="post" action="/alipay/wapPay/doPay">
    <div class="form-group">
        <label for="orderNo" class="col-sm-2 control-label">订单号</label>
        <div class="col-sm-8">
            <div class="input-group">
                <input class="form-control" id="orderNo" name="orderNo"
                       placeholder="订单号">
                <span class="input-group-btn">
                        <button class="btn btn-default" type="button" id="getOrderNo">获取订单号</button>
                    </span>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label for="subject" class="col-sm-2 control-label">商品名称</label>
        <div class="col-sm-8">
            <input class="form-control" id="subject" name="subject"
                   value="Mac Book Pro 2019"
                   placeholder="商品名称">
        </div>
    </div>
    <div class="form-group">
        <label for="totalAmount" class="col-sm-2 control-label">商品价格</label>
        <div class="col-sm-8">
            <input class="form-control" id="totalAmount" name="totalAmount"
                   value="0.01"
                   placeholder="商品价格">
        </div>
    </div>
    <div class="form-group">
        <label for="notifyUrl" class="col-sm-2 control-label">异步通知地址</label>
        <div class="col-sm-8">
            <input class="form-control" id="notifyUrl" name="notifyUrl"
                   value="${notifyUrl!}"
                   placeholder="异步通知地址">
        </div>
    </div>
    <div class="form-group">
        <label for="returnUrl" class="col-sm-2 control-label">同步通知地址</label>
        <div class="col-sm-8">
            <input class="form-control" id="returnUrl" name="returnUrl"
                   value="${returnUrl!}"
                   placeholder="同步通知地址">
        </div>
    </div>
    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-8">
            <button type="submit" class="btn btn-default btn-block">确认支付</button>
        </div>
    </div>
</form>
<div id="qrcode" data-qrcode="${mobileUrl}" class="text-center">
</div>
<div class="text-center"><span>扫描二维码手机访问</span></div>
<script src="/plugins/jquery-qrcode/jquery.qrcode.min.js"></script>
<script>
    $('#qrcode').qrcode($("#qrcode").data("qrcode"));
    $("#getOrderNo").on("click", function () {
        $.post('/common/order/getOrderNo', {}, function (resp) {
            $("input[name='orderNo']").val(resp);
        });
    });
</script>
@}